﻿using System;
using System.IO;
using OpenLS.Spreadsheet.Drawing;

namespace OpenLS.Spreadsheet.Formats.Biff.OfficeArt
{
    internal abstract class OfficeArtSpgrContainerFileBlock : OfficeArtRecord
    {

        public static OfficeArtSpgrContainerFileBlock ReadOptional(OfficeArtReadContext context)
        {
            var type = OfficeArtRecordHeader.Peek(context);
            switch (type)
            {
                case RecType.OfficeArtSpContainer:
                case RecType.OfficeArtSpgrContainer:
                    return (OfficeArtSpgrContainerFileBlock) OfficeArtRecord.ReadRecord(context);
                default:
                    return null;
            }
        }


        public abstract Anchor GetClientAnchorSheet(BiffReaderWorksheetContext context);

        public abstract uint SpId { get; }
    }
}